package com.edu.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import com.alibaba.fastjson2.annotation.JSONField;

import java.time.LocalDateTime;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class UserEntity {
    //用户
    private int userId;

    private String username;

    private String email;

    @JSONField(serialize = false)
    private String password;

    @JSONField(name = "role")
    private String role;

    @JSONField(name = "register_date", format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime registerDate;

    @JSONField(name = "is_email_verified")
    private boolean isEmailVerified;

    public UserEntity(int userId, String username, String email, String password) {
        this.userId = userId;
        this.email=email;
        this.username=username;
        this.password=password;
    }

    public UserEntity(int userId, String username, String email) {
    }
}